import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
var _excluded = ["children", "className", "title"];

/**
 * SubMain.js
 * @date 2018/11/23
 */
import React from 'react';
import styles from "../index.less?modules";

var SubMain = /*#__PURE__*/function (_React$Component) {
  _inherits(SubMain, _React$Component);

  var _super = _createSuper(SubMain);

  function SubMain() {
    _classCallCheck(this, SubMain);

    return _super.apply(this, arguments);
  }

  _createClass(SubMain, [{
    key: "render",
    value: function render() {
      var _this$props = this.props,
          children = _this$props.children,
          className = _this$props.className,
          title = _this$props.title,
          other = _objectWithoutProperties(_this$props, _excluded);

      var subMainClassName = styles['sub-main'];

      if (className) {
        subMainClassName += " ".concat(className);
      }

      return /*#__PURE__*/React.createElement("div", Object.assign({
        className: subMainClassName
      }, other), /*#__PURE__*/React.createElement("h4", null, title), children);
    }
  }]);

  return SubMain;
}(React.Component);

export { SubMain as default };